Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vastly improve perf of parsing bulk strings #247

Merged
merged 1 commit into from
Apr 17, 2023
Merged

Conversation

whatyouhide
Copy link
Owner

@whatyouhide whatyouhide commented Apr 17, 2023

Closes #246.

Benchmarks are here 👇

Benchmark run from 2023-04-17 06:05:51.925956Z UTC

System

Benchmark suite executing on the following system:

Operating System macOS
CPU Information Apple M1 Pro
Number of Available Cores 8
Available Memory 16 GB
Elixir Version 1.14.3
Erlang Version 25.3

Configuration

Benchmark suite executing with the following configuration:

:time 5 s
:parallel 1
:warmup 2 s

Statistics

Run Time

Name IPS Average Devitation Median 99th %
parse a bulk string split into 1kb chunks (eredis) 2962582.03 0.00034 ms ±291.72% 0.00033 ms 0.00046 ms
parse a bulk string split into 1kb chunks (Redix with improvements) 2196301.58 0.00046 ms ±6621.11% 0.00038 ms 0.00054 ms
parse a bulk string split into 1kb chunks (Redix main) 2068512.05 0.00048 ms ±35.03% 0.00050 ms 0.00063 ms
parse a bulk string split into 1kb chunks (Redix with improvements) 20124.97 0.0497 ms ±40.51% 0.0476 ms 0.100 ms
parse a bulk string split into 1kb chunks (eredis) 3049.79 0.33 ms ±19.15% 0.32 ms 0.47 ms
parse a bulk string split into 1kb chunks (Redix with improvements) 176.51 5.67 ms ±36.97% 4.37 ms 11.15 ms
parse a bulk string split into 1kb chunks (Redix main) 20.48 48.82 ms ±4.70% 47.85 ms 53.70 ms
parse a bulk string split into 1kb chunks (eredis) 18.01 55.53 ms ±6.38% 55.92 ms 62.92 ms
parse a bulk string split into 1kb chunks (Redix main) 0.00288 347032.56 ms ±0.00% 347032.56 ms 347032.56 ms

Run Time Comparison

Name IPS Slower
parse a bulk string split into 1kb chunks (eredis) 2962582.03  
parse a bulk string split into 1kb chunks (Redix with improvements) 2196301.58 1.35x
parse a bulk string split into 1kb chunks (Redix main) 2068512.05 1.43x
parse a bulk string split into 1kb chunks (Redix with improvements) 20124.97 147.21x
parse a bulk string split into 1kb chunks (eredis) 3049.79 971.4x
parse a bulk string split into 1kb chunks (Redix with improvements) 176.51 16784.5x
parse a bulk string split into 1kb chunks (Redix main) 20.48 144624.87x
parse a bulk string split into 1kb chunks (eredis) 18.01 164517.97x
parse a bulk string split into 1kb chunks (Redix main) 0.00288 1028112417.69x

@github-actions
Copy link

Pull Request Test Coverage Report for Build c11c2d5e8ba238f6b2be6d802dd02264d68caba0-PR-247

  • 9 of 9 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 85.983%

Totals Coverage Status
Change from base Build b890b0bb2e2903706384eb433ae6a288feebca2d: 0.04%
Covered Lines: 595
Relevant Lines: 692

💛 - Coveralls

@whatyouhide whatyouhide merged commit 56a0851 into main Apr 17, 2023
@whatyouhide whatyouhide deleted the al/perf-improvements branch April 17, 2023 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow requests for keys that hold large data (~70MB)
1 participant